#include "stdafx.h"
#include "Alien.h"
#include "Input.h"
#include "Timer.h"


CAlien::CAlien()
{
}

CAlien::CAlien(float x_, float y_, float w_, float h_, int texture_):CSprite(x_,y_,w_,h_,texture_)
{

}

CAlien::~CAlien()
{
}

void
CAlien::update()
{
	if (dir == true)
	{
		m_fX += 0.03;
	}
	else if (dir == false)
	{
		m_fX -= 0.03;
	}
	
	if (m_fX > 3)
	{
		m_fY -= 0.1;
		dir = false;		
	}

	else if (m_fX < -3)
	{
		m_fY -= 0.1;
		dir = true;		
	}
	
	/* if (CInput::getInstance()->getIfKeyDown(DIK_UP))
	{
		m_fY += 0.01;
	}

	if (CInput::getInstance()->getIfKeyDown(DIK_DOWN))
	{
		m_fY -= 0.01;
	} */
}